<template>
  <div class="hjr-card">
    <div v-if="title || $slots.header" class="hjr-card__header">
      <slot name="header">
        <h3 class="hjr-card__title">{{ title }}</h3>
      </slot>
    </div>
    
    <div class="hjr-card__body">
      <slot />
    </div>
    
    <div v-if="$slots.footer" class="hjr-card__footer">
      <slot name="footer" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'HjrCard',
  props: {
    title: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped>
.hjr-card {
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.hjr-card:hover {
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
}

.hjr-card__header {
  padding: 16px 20px;
  border-bottom: 1px solid #e4e7ed;
  background-color: #fafafa;
}

.hjr-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.hjr-card__body {
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

.hjr-card__footer {
  padding: 16px 20px;
  border-top: 1px solid #e4e7ed;
  background-color: #fafafa;
  text-align: right;
}
</style>
